package store

import (
	"context"
	"ota/model"
	"ota/model/entity"
)

type IUpgradePlan interface {
	// Create
	Create(ctx context.Context, e *entity.UpgradePlan) (int64, error)
	// Find
	Find(ctx context.Context, in *model.UpgradePlanInfoRequest) (*entity.UpgradePlan, error)
	// Update
	Update(ctx context.Context, id int64, updates map[string]interface{}) error

	// Updates
	Updates(ctx context.Context, id []int64, updates map[string]interface{}) error

	// Delete
	Delete(ctx context.Context, id int64) error

	// List
	List(ctx context.Context, in *model.UpgradePlanListRequest, opts ...model.QueryOptions) (int, []*entity.UpgradePlan, error)
	// ExecTransaction
	ExecTransaction(ctx context.Context, callback func(ctx context.Context) error) error
}
